home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Know Your Baseball - The Greatest Player Resource
/
Know Your Baseball - Greatest Player.iso
/
Baseball
/
Director
/
SHARED.CST
/
00011_Script_Special KTG functions
< prev
next >
Wrap
Text File
|
1998-09-21
|
6KB
|
229 lines
global sndflag, gClicked,gcontrols,gTXTflag,sndflag1,gbuttonStatus2,gbuttonStatus,gAll
on off
repeat with x = 40 to 48
set the blend of sprite x = 0
end repeat
setspritesKTG
set sndflag1 = 3
go "1off"
mLoadKTGO(gcontrols)
mAllprompt(gcontrols) gAll
mOffndicators(gControls)
set gall = 0
set the castnum of sprite 25 to (the number of cast "showall")
setspritesKTG
end
on cen
repeat with x = 40 to 48
set the blend of sprite x = 0
end repeat
setspritesKTG
set sndflag1 = 2
go "1cen"
mLoadKTGC(gcontrols)
mAllprompt(gcontrols) gAll
mCenIndicators(gControls)
set gAll = 0
set the castnum of sprite 25 to (the number of cast "showall")
setspritesKTG
end
on def
repeat with x = 40 to 48
set the blend of sprite x = 0
end repeat
setspritesKTG
set sndflag1 = 1
go "1def"
mLoadKTGD(gcontrols)
mAllprompt(gcontrols) gAll
NewIndicators(gcontrols)
set gAll = 0
set the castnum of sprite 25 to (the number of cast "showall")
setspritesKTG
end
-- turns info text on and off for offence, defence and centre
on ShowinfoD
set gAll = 1
showAll
set a = the name of cast ( the castnum of sprite the clickon) & ".TXD"
repeat with x = 40 to 48
if the castnum of sprite x > 0 then set match = the name of cast (the castnum of sprite x)
if match = a then
set the blend of sprite x to 100
else
set the blend of sprite x to 0
end if
end repeat
end
on ShowinfoC
set gAll = 1
showAll
set a = the name of cast ( the castnum of sprite the clickon) & ".TXC"
repeat with x = 40 to 48
if the castnum of sprite x > 0 then set match = the name of cast (the castnum of sprite x)
if match = a then
set the blend of sprite x to 100
else
set the blend of sprite x to 0
end if
end repeat
end
on ShowinfoO
set gAll = 1
showAll
set a = the name of cast ( the castnum of sprite the clickon) & ".TXO"
repeat with x = 40 to 48
if the castnum of sprite x > 0 then set match = the name of cast (the castnum of sprite x)
if match = a then
set the blend of sprite x to 100
else
set the blend of sprite x to 0
end if
end repeat
end
on ShowAll
global gAll
if gAll < 1 then
mAllprompt(gcontrols) gAll
set the castnum of sprite 25 to (the number of cast "Hideall")
repeat with x = 40 to 48
set the blend of sprite x = 100
end repeat
set gAll = 1
exit
end if
if gAll = 1 then
mAllPrompt(gControls) gAll
set the castnum of sprite 25 to (the number of cast "showall")
repeat with x = 40 to 48
set the blend of sprite x = 0
end repeat
set gAll = 0
end if
end
on ShowallFlys
global gAll
if gAll < 1 then
mAllPrompt(gControls) gAll
set the blend of sprite 48 = 100
set the castnum of sprite 27 to (the number of cast "Hideall")
set gAll = 1
updatestage
exit
end if
if gAll = 1 then
mAllPrompt(gControls) gAll
set the blend of sprite 48 = 0
set the castnum of sprite 27 to (the number of cast "showall")
set gAll = 0
updatestage
end if
end
-- called from clipboard to turn off showall if it is on
on ShowallFlys1
global gAll
if gAll = 1 then
set the blend of sprite 48 = 0
set the castnum of sprite 27 to (the number of cast "showall")
set gAll = 0
updatestage
end if
end
on HideallFly
if the blend of sprite 48 = 100 then
set the blend of sprite 48 to 0
set the castnum of sprite 27 to (the number of cast "showall")
FlyBallSound
updatestage
end if
FlyBallSound
AnimateIT
end
-- ball animation script
on AnimateIT
set the blend of sprite 34 to 100
set gH = the loch of sprite gClicked - the locH of sprite 10
set gV = the locv of sprite gClicked - the locV of sprite 10
set Pitch = gh/40
set the locH of sprite 34 = the locH of sprite 10
set the locv of sprite 34 = the locv of sprite 10
if gclicked = 19 then
set gV = gv-24
set gH= gH+20
set the locv of sprite 34 = the locv of sprite 10+10
end if
put the locH of sprite 34 into cx
put the locv of sprite 34 into cv
if pitch >=0 then
repeat with angle = 1 to 40
set offset = (20 - angle) /4
set the locH of sprite 34 to (gH/40)+the locH of sprite 34-offset
set the locV of sprite 34 to (gV/40)+the locV of sprite 34
updatestage
end repeat
end if
if pitch < 0 then
repeat with angle = 1 to 40
set offset = (20 - angle) /4
set the locH of sprite 34 to (gH/40)+the locH of sprite 34+offset
set the locV of sprite 34 to (gV/40)+the locV of sprite 34
updatestage
end repeat
end if
set the blend of sprite 34 to 0
end
-- plays sound files for KTG3 flyballs
on FlyBallSound
mSoundPlayBack gControls,(gClicked-9),1,1
end
on Clipboard
set the blend of sprite 48 to 0
set a = the name of cast ( the castnum of sprite the clickon) & ".TXT"
repeat with x = 10 to 17
if the castnum of sprite x > 0 then set match = the name of cast (the castnum of sprite x)
if match = a then
ShowallFlys1
set gClicked = x+9
animateIt
set gbuttonStatus2 = x+9
set the blend of sprite x to 100
mSoundPlayBack gControls,( X),1,1
else
-- set the blend of sprite x to 0
end if
end repeat
end